﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace App.Validate
{
    public class GreaterThanValidatorElementAttribute : ValidatorElementAttribute
    {
        public IComparable LowerBound { get; private set; }

        public GreaterThanValidatorElementAttribute(string name, int lowerBound)
            : base(name)
        {
            this.LowerBound = lowerBound;
        }

        public GreaterThanValidatorElementAttribute(string name, double lowerBound)
            : base(name)
        {
            this.LowerBound = lowerBound;
        }

        public GreaterThanValidatorElementAttribute(string name, DateTime lowerBound)
            : base(name)
        {
            this.LowerBound = lowerBound;
        }

        public override Validator CreateValidator()
        {
            return new GreaterThanValidator(string.Empty, this.LowerBound);
        }
    }
}
